Fix the computation of the width of dual-width fonts.
authorRob Browning <rlb@defaultvalue.org>
Mon, 18 Oct 2010 04:19:02 +0000 (23:19 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 18 Oct 2010 04:19:02 +0000 (23:19 -0500)
debian/changelog
debian/patches/fix-fc-dual-font-width-calculation.diff [new file with mode: 0644]
debian/patches/series

index e8e44e10834880d584a4b2aae8b54ecc5e9bab4c..92d3869a141ffe8636a527e1fc3528d6a7f60bc2 100644 (file)
@@ -21,7 +21,13 @@ emacs23 (23.2+1-5) unstable; urgency=low
     emacs-snapshot.  Thanks to Artem Chuprina <ran@wizzle.ran.pp.ru>
     for the report. (closes: #397757)
 
- -- Rob Browning <rlb@defaultvalue.org>  Mon, 18 Oct 2010 00:16:26 -0500
+  * Apply upstream patch to fix the computation of the width of
+    dual-width fonts (fix-fc-dual-font-width-calculation.diff).
+    Thanks to mizuno hajime <hajime.mizuno@gmail.com> for the report
+    and Sven Joachim <svenjoac@gmx.de> for tracking down the
+    patch. (closes: #588808)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Mon, 18 Oct 2010 00:17:56 -0500
 
 emacs23 (23.2+1-4) unstable; urgency=low
 
diff --git a/debian/patches/fix-fc-dual-font-width-calculation.diff b/debian/patches/fix-fc-dual-font-width-calculation.diff
new file mode 100644 (file)
index 0000000..ab641c5
--- /dev/null
@@ -0,0 +1,59 @@
+* The font width should now be computed correctly for dual-width fonts.
+  Patch: fix-fc-dual-font-width-calculation.diff
+  Provided-by: Sven Joachim <svenjoac@gmx.de>
+  Date: Mon, 12 Jul 2010 16:32:53 +0200
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: incorporated upstream
+
+  The Debian patch is taken from this upstream commit:
+
+  revno: 99907
+  author: Naohiro Aota  <naota@elisp.net>
+  committer: Chong Yidong <cyd@stupidchicken.com>
+  branch nick: emacs-23
+  timestamp: Wed 2010-06-30 10:22:18 -0400
+  message:
+    Check FC_DUAL too.  For such fonts, check width one by one (Bug#4129).
+    * xftfont.c (xftfont_open): Check font width one by one also when
+    spacing is dual.
+
+    * ftfont.c (ftfont_open): Ditto.
+
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -8,6 +8,13 @@
+        * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA
+        (Bug#6214).
++2010-06-30  Naohiro Aota  <naota@elisp.net>  (tiny change)
++
++      * xftfont.c (xftfont_open): Check font width one by one also when
++      spacing is dual.
++
++      * ftfont.c (ftfont_open): Ditto.
++
+ 2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
+       * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
+--- a/src/ftfont.c
++++ b/src/ftfont.c
+@@ -1262,7 +1262,7 @@
+     spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
+   else
+     spacing = FC_PROPORTIONAL;
+-  if (spacing != FC_PROPORTIONAL)
++  if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
+     font->min_width = font->average_width = font->space_width
+       = (scalable ? ft_face->max_advance_width * size / upEM
+        : ft_face->size->metrics.max_advance >> 6);
+--- a/src/xftfont.c
++++ b/src/xftfont.c
+@@ -429,7 +429,7 @@
+       ascii_printable[i] = ' ' + i;
+     }
+   BLOCK_INPUT;
+-  if (spacing != FC_PROPORTIONAL)
++  if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
+     {
+       font->min_width = font->average_width = font->space_width
+       = xftfont->max_advance_width;
index ea59bc3795bd16ebdf16c2c830cac1e41f726759..f29aaa58457fe6c075e33655012c7aff90e9546b 100644 (file)
@@ -13,3 +13,4 @@ prevent-string-stack-overflow.diff
 prevent-let-eval-apply-stack-overflow.diff
 use-safe-alloca-lisp-in-let-eval-apply-apply_lambda.diff
 fix-gnus-output-to-mail-with-live-rmail-buffers.diff
+fix-fc-dual-font-width-calculation.diff